﻿using System.Web.Caching;
using System.Web.Mvc;
using ABC.Business.Models;
using ABC.Controllers.ViewModels.My;
using ABC.Domain.Enums;
using System;

namespace ABC.Controllers.Areas.My
{
    [Authorize]
    public class MyController : BaseController
    {
        private readonly NewsModel newsModel;

        public MyController(NewsModel newsModel)
        {
            this.newsModel = newsModel;
        }
        public ActionResult Index()
        {
            var model = new MyViewModel();
            model.News = newsModel.GetNewsForGeneralPage();
            model.Actions = newsModel.GetActionsForGeneralPage();
            
            if (HttpContext.Cache["123"]!= null)
            {
                var t = HttpContext.Cache["123"];
            }
            return View(model);
        }

    }
}
